<?php
/**
 * Created by PhpStorm.
 * User: wangjie
 * Date: 2018/11/22
 * Time: 18:20
 */

namespace common\services\tool;

use Yii;
use common\services\tool\ToolString;

class ToolUrl
{
    /**
     * URL加密 urlEncode
     * @param $url
     * @return array
     */
    public static function urlEncode($url)
    {
        return urlencode($url);
    }

    /**
     * URL解密 decode
     * @param $url
     * @return array
     */
    public static function urlDecode($url)
    {
        return urldecode($url);
    }

    /**
     * URL加密 base64_encode
     * @param $url
     * @return array
     */
    public static function base64Encode($url)
    {
        return base64_encode($url);

    }

    /**
     * URL解密 base64_decode
     * @param $url
     * @return array
     */
    public static function base64Decode($url)
    {
        return base64_decode($url);
    }
}